package behavioral.visitor;

/**
 * @ClassName: Book
 * @Description: 具体元素类
 * @Author: liu-hao
 * @Date: 2023-04-10 22:11
 * @Version: 1.0
 **/
public class Book implements Element {
    private String title;
    private String author;

    public Book(String title, String author) {
        this.title = title;
        this.author = author;
    }

    public String getTitle() {
        return title;
    }

    public String getAuthor() {
        return author;
    }

    @Override
    public void accept(Visitor visitor) {
        visitor.visit(this);
    }
}
